<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html >
	<head>
<?php global $_G; ?>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title><?php if(isset($selftitle)) echo $selftitle . ' | '; if(isset($_G['seo']['webtitle']))echo $_G['seo']['webtitle']; ?></title>
<meta name="keywords" content="<?php if(isset($_G['seo']['webkeywords']))echo $_G['seo']['webkeywords']; ?>" />
<meta name="description" content="<?php if(isset($selfdescription)){echo $selfdescription;} else {if(isset($_G['seo']['webdescription']))echo $_G['seo']['webdescription'];} ?>" />
<meta name="generator" content="<?php if(isset($_G['seo']['webauthor']))echo $_G['seo']['webauthor']; ?>" />
<meta name="author" content="<?php if(isset($_G['seo']['webauthor']))echo $_G['seo']['webauthor']; ?>" />
<meta name="robots" content="all" />
<meta name="copyright" content="<?php if(isset($_G['seo']['copyright']))echo $_G['seo']['copyright']; ?>" />


<!-- 引入需要的css和js -->
<link href="<?php echo MY_CDN; ?>/css/bootstrap/bootstrap.edit.css" rel="stylesheet" />
<link href="<?php echo MY_CDN; ?>/css/common.css" rel="stylesheet" />
<script type="text/javascript">
var Y = {
	'_CDN_' : '<?php echo MY_CDN; ?>',
	'_ROOT_' : '__ROOT__',
	'_APP_' : '__APP__',
	'_MID_' : '<?php if(isset($_G['mid'])) echo $_G['mid']; else echo '-1'; ?>',
	'_OID_' : '<?php if(isset($_G['oid'])) echo $_G['oid']; else echo '-1'; ?>'
};
</script>
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/YLoader.js"></script>
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/jquery.1.8.0.min.js"></script>
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/common.js"></script>

<link href="<?php echo MY_CDN; ?>/css/list.css" rel="stylesheet" />
<style type="text/css" rel="stylesheet">
.page{clear:both;padding:15px 0;text-align:center}
.page a,.page a:visited{background-color:#F6F6F6;border:1px solid #D7D7D7;color:#333333;margin-right:6px;padding: 6px;line-height:15px;text-decoration:none}
.page a:hover {margin-right: 6px;border: 1px solid #9EC4D7;color: #033D5A;	background: #E4EFF5;padding: 6px;text-decoration:none}
.page a:active{margin-right: 6px;padding: 6px;line-height:15px}
.page span.current {FONT-WEIGHT: bold;	color: #000;margin-right: 6px;padding: 6px}
.page span.disabled{color: #333;margin-right: 6px;padding: 6px}
.page span.quantity{color: #333;margin-right: 6px;padding: 6px}
</style>
	</head>
	<body>
<!-- navigation -->
<div class="y-nav">
	<div class="y-wrapper990 y-nav-wrapper">
		<div class="y-nav-left">
			<a href="__ROOT__/"><?php if(isset($_G['seo']['webname']))echo $_G['seo']['webname']; ?></a>
		</div>
		<div class="y-nav-right">
			<!--
			<div class="y-userArea y-pullLeft">
				<a href="#" class="y-nav-aLink">登录</a>
				<a href="#" class="y-nav-aLink">注册</a>
			</div>
			<div class="y-userArea y-pullLeft">
				<a href="__ROOT__/" class="y-nav-aLink show"><img src="__ROOT__/Public/images/tlp.png" /></a>
				<div class="y-dropdown-small">
					<a href="#">账号设置</a>
					<a href="#">个人中心</a>
					<a href="#">退出</a>
				</div>
			</div>
			-->
		</div>
	</div>
</div><div class="y-clear"></div><div class="y-ieFixedPropertyBug"></div><!-- 1用了浮动 需clear 2只是站位修复ie6不支持fixed -->

<!-- // navigation -->
		
<!-- header -->
<div class="y-header">
	<div class="y-wrapper990 y-header-wrapper">
		<div class="y-header-left">
			<!-- logo here -->
			<a href="/" class="y-logolink">&nbsp;</a>
		</div>
		<div class="y-header-right">
			<form action="<?php echo y_u('Search');?>" method="get" >
			<input type="text" id="k" name="k" value="" maxlength="20" class="append input-xxlarge y-transparent" placeholder="搜索" autocomplete="off" x-webkit-speech lang="zh-CN" x-webkit-grammar="bUIltin:search"/><button type="submit" class="append btn btn-inverse btn-bigPadding">搜索</button>
			</form>
		</div>
		<div class="y-clear"></div>
	</div>
</div>
<!-- // header -->
		
<!-- category -->
<div class="y-category">
	<ul class="y-wrapper990">
		<!--
		<li class="y-category-item" name="sideCategoryLi">
			<span class="y-alinkTxt-big">
				分类
				<a href="javascript:;" class="y-tuding y-tuding-white" title="关闭"></a>
			</span>
			<div class="y-sideCategory" id="sideCategoryDiv" >
				<dl >
					<dt>农</dt>
					<dd>
						<a href="">玉米</a><a href="">大豆</a>
					</dd>
					<div class="y-sideCategorySub">
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
					</div>
				</dl>
				<dl >
					<dt>林</dt>
					<dd>
						<a href="">玉米</a>
						<a href="">小麦</a>
					</dd>
					<div class="y-sideCategorySub">
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
					</div>
				</dl>
				<dl >
					<dt>牧</dt>
					<dd>
						<a href="">玉米</a><a href="">小麦</a>
					</dd>
					<div class="y-sideCategorySub">
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
					</div>
				</dl>
				<dl >
					<dt>副</dt>
					<dd>
						<a href="">玉米</a><a href="">小麦</a>
					</dd>
					<div class="y-sideCategorySub">
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
					</div>
				</dl>
				<dl >
					<dt>渔</dt>
					<dd>
						<a href="">玉米</a><a href="">小麦</a>
					</dd>
					<div class="y-sideCategorySub">
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
						<h5>asdfasdf</h5>
						<a href="">玉米</a><a href="">小麦</a><a href="">大豆</a><a href="">花生</a><a href="">玉米</a>
					</div>
				</dl>
			</div>
		</li>
		-->
		
<?php
$reallink = ''; $newpage = ''; for($x=0; $x<count($_G['category']); $x++){ $reallink = '1' == $_G['category'][$x]['linktype'] ? y_u($_G['category'][$x]['caturl']) : $_G['category'][$x]['caturl']; $_G['category'][$x]['newpage'] == '1' && ($newpage = 'target="_blank"'); if(isset($_G['category'][$x]['_child'])) { ?>
		<li class="y-category-item" name="show">
			<a href="<?php echo ($reallink); ?>" class="y-alinkTxt"><?php echo ($_G['category'][$x]['catname']); ?></a>
			<div class="y-category-dropdown">
				<?php  foreach($_G['category'][$x]['_child'] as $val){ $reallink = '1' == $val ? $val['caturl'] : y_u($val['caturl']); $newpage = '1' == $val['newpage'] ? 'target="_blank"' : ''; ?>
				<a href="<?php echo ($reallink); ?>" <?php echo ($newpage); ?>><?php echo ($val['catname']); ?></a>
				<?php } ?>
			</div>
		</li>
<?php  } else { ?>
<li class="y-category-item" name="unshow">
	<a href="<?php echo ($reallink); ?>" class="y-alinkTxt" <?php echo ($newpage); ?>><?php echo ($_G['category'][$x]['catname']); ?></a>
</li>
<?php  } } ?>
<li class="y-category-item" name="show">
	<a href="#" class="y-alinkTxt">
		帮助
	</a>
	<div class="y-category-dropdown">
		<a href="#">疑问</a>
		<a href="#">其它</a>
	</div>
</li>
	</ul>
	<div class="y-clearL"></div>
</div>

<!-- category -->
		
	<!-- container -->
	<div class="y-bigBlankBar"></div>
	<div class="y-wrapper990">
		<div class="y-leftContainer y-pullLeft">

<?php if(is_array($data)): foreach($data as $key=>$val): ?><div class="y-listItem">
	<div class="y-listItemWrapper">
		<div class="y-listItem-title">
			<h2>
				<span class="y-degress y-pullRight"><?php echo ($val['viewnum']); ?> ℃</span>
				<span><a href="<?php echo y_u('Detail/index', 'id='.$val['id']);?>" title="<?php echo ($val['title']); ?>"><?php echo ($val['title']); ?></a></span>
			</h2>
			<div class="y-infoIcons">
				<span class="timeico" title="精确时间"><?php echo date('Y年m月d号H点i分', $val['posttime']);?></span>
			</div>
		</div>
		<div class="y-listItem-left y-pullLeft">
			<a href="<?php echo y_u('Detail/index', 'id='.$val['id']);?>" title="<?php echo ($val['title']); ?>">
				<img src="<?php echo y_viewImage($val['viewimage']);?>" alt="<?php echo ($val['title']); ?>">
			</a>
		</div>
		<div class="y-listItem-right">
			<?php echo ($val['description']); ?>		
		</div>
		<div class="y-clearL"></div>
		<div class="y-tags">
			<?php echo y_tags($val['tags']);?>
		</div>
	</div>
</div><?php endforeach; endif; ?>		
<div class="page">
<?php echo ($pageString); ?>
</div>
		</div>
		
		<div class="y-rightContainer y-pullRight">
<?php $data=M("Article")->field('id,title')->order('viewnum desc')->limit('6')->select();if(is_array($data)){ } ?>
<div class="y-rightListTitle-common y-shadow">热点文章</div>
<div class="y-rightListItem-common">
	<ul>
<?php if(is_array($data)): foreach($data as $key=>$val): ?><li><a href="<?php echo y_u('Detail/index', 'id='.$val['id']);?>"><?php echo ($val['title']); ?></a></li><?php endforeach; endif; ?>
	</ul>
</div>

		</div>
		<div class="y-clear"></div>
	</div>
	<!-- // container -->
	
<!-- footer -->
<div class="y-quickbar" id="yQuickbar">
	<div class="y-quickbar-nav" id="yQuickbarNavArea">
		<div class="y-quickbar-nav-item ">
			<a href="javascript:;" title="我看过的" id="yQuickbarMyViewBtn">
				<i class="y-icon y-icon-white y-icon-eye-open"></i>
				<div>看过</div>
			</a>
		</div>
		<div class="y-quickbar-nav-item">
			<a href="javascript:;" title="个人中心" id="yQuickbarMySelfBtn">
				<i class="y-icon y-icon-white y-icon-user"></i>
				<div>我</div>
			</a>
		</div>
	</div>
	<div class="y-quickbar-close">
		<a href="javascript:;" id="yQuickbarCloseBtn">&times;</a>
	</div>
	<div class="y-quickbar-open" id="yQuickbarOpen">
		<a href="javascript:;" class="y-quickbar-open-icon" id="yQuickbarOpenBtn"></a>
	</div>
</div>
<div class="y-quickbar-slider" id="ySlider">
	<div class="y-quickbar-slider-padding">
		<!-- closeBtn -->
		<div class="y-quickbar-slider-top">
			<span ><a href="javascript:;" id="ySliderCloseBtn" class="y-quickbar-slider-icon y-quickbar-slider-icon-close"></a></span>
			<span id="ySliderTitle">&nbsp;</span>
		</div>
		<!-- userinfo -->
		<div class="y-quickbar-slider-user">
			&nbsp;<!-- userinfo area -->
		</div>
		<!-- content -->
		<div class="y-quickbar-slider-content" id="ySliderContent">
			
			<!-- 侧边内容
			<div class="y-noHistory"></div>
			<a class="y-history-item" href="">
				<div class="y-history-item-sawtooth"></div>
				<div class="y-history-item-padding">
					<p >赞皇大枣</p>
					<p class="y-history-item-price">￥12.5</p>
				</div>
			</a>
			<a class="y-history-item" href="">
				<div class="y-history-item-sawtooth"></div>
				<div class="y-history-item-padding">
					<p >赞皇大枣</p>
					<p class="y-history-item-price">￥12.5</p>
				</div>
			</a>
			<div class="y-clearHistory"><a href="javascript:;" id="yClearHistory">删除历史记录</a></div>
			-->
			
		</div>
	</div>
</div>
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/QuickbarJQ.js"></script>
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/History.js"></script>
<script type="text/javascript" >new QuickbarJQ().init();</script>

<!-- // footer -->
	
<!-- footer -->
<div class="y-bigBlankBar"></div>
<div class="y-footer">
	<div class="y-footer-wrapper">
		<div class="y-footer-column y-pullLeft y-footerMargin">
			<h3>Company</h3>
			<p>
			<br />
<?php if(isset($_G['footer'])) {echo $_G['footer']['company'];} ?>
			</p>
		</div>
		<div class="y-footer-column y-pullLeft y-footerMargin">
			<h5 >Question</h5>
			<ul >
<?php if(is_array($_G['footer']['question'])) { foreach($_G['footer']['question'] as $val) { echo '<li><a target="_blank" href="'.$val['url'].'">'.$val['title'].'</a></li>'; } } ?>
			</ul>
		</div>
		<div class="y-footer-column y-pullLeft y-footerMargin">
			<h5 >Community</h5>
			<ul >
<?php if(is_array($_G['footer']['community'])) { foreach($_G['footer']['community'] as $val) { echo '<li><a target="_blank" href="'.$val['url'].'">'.$val['title'].'</a></li>'; } } ?>		
			</ul>
		</div>
		<div class="y-footer-column y-pullLeft y-footerMargin">
			<h5 >Connect</h5>
			<ul >
<?php if(is_array($_G['footer']['connect'])) { foreach($_G['footer']['connect'] as $val) { echo '<li><a target="_blank" href="'.$val['url'].'">'.$val['title'].'</a></li>'; } } ?>
			</ul>
		</div>
		<div class="y-clearL"></div>
	</div>
	<div class="y-footer-copyright">
<?php if(isset($_G['footer'])) {echo $_G['footer']['copyright'];} ?>
	</div>
	<div>
<?php if(isset($_G['footer'])) {echo $_G['footer']['tongji'];} ?>	
	</div>
	<div class="y-blankBar"></div>  <!-- fill background color -->
</div>
<!-- back2top -->
<div id="control2Top"></div>
<script src="<?php echo MY_CDN; ?>/js/YBackToTop.js"></script>
<script>new YBackToTop('control2Top').init();</script>
<!-- // back2top -->

<!-- // footer -->

	</body>
</html>